﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraReports.UI;

namespace DXW
{
    public partial class FrmPrint : DevExpress.XtraEditors.XtraForm
    {
        public FrmPrint()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Set XtraReport
        /// </summary>
        /// <param name="r">Xtra report</param>
        public void SetReport(XtraReport r)
        {
            printControl1.PrintingSystem = r.PrintingSystem;
            r.CreateDocument();
            printControl1.UpdatePageView();
        }
    }
}